package com.thx.user;

import com.thx.user.service.UserManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.AuthenticationProvider;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.AuthenticationException;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpSession;

/**
 * 自定义 Spring Security 的认证组件
 *
 * Created by zhangxh on 16/7/23.
 */
@Component
public class DatabaseAuthenticationProvider implements AuthenticationProvider {

    @Autowired
    protected UserManager userMgr;

  /*  @Autowired
    private HttpSession httpSession;*/

    @Override
    public Authentication authenticate(Authentication authentication) throws AuthenticationException {
        return null;
    }

    @Override
    public boolean supports(Class<?> authentication) {
        return true;
    }
}
